package com.cswangdao.mapper;

import com.cswangdao.domain.dto.BrandPageDTO;
import com.cswangdao.domain.model.MarketBrand;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface MarketBrandMapper {

    Page<MarketBrand> pageQueryInfo(BrandPageDTO pageDTO);

    void addBrand(MarketBrand brand);

    void updateById(MarketBrand brand);

    @Delete("delete from market_brand where id = #{id} ")
    void deleteById(@Param("id") Integer id);

    List<MarketBrand> getAll(@Param("limit") Integer limit);

    List<MarketBrand> getAll2();

    MarketBrand getById(@Param("brandId") Integer brandId);
}